package org.blogwu.jvm_learn.service;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

@Service
public class AyscService {

    @Async
    public String addUserAndSendEmail() {
        System.out.println("2");

        try {
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("3");
        return "Hello";
    }

}
